import { defineStore } from "pinia";
import { TenantState } from "@/stores/interface";
import piniaPersistConfig from "@/config/piniaPersist";

export const useTenantStore = defineStore({
  id: "manage-tenant",
  state: (): TenantState => ({
    info: null,
  }),
  getters: {},
  actions: {
    // Set tenantInfo
    setTenantInfo(info: TenantState["info"]) {
      this.info = info;
    },
  },
  persist: piniaPersistConfig("zj-manage-tenant"),
});
